<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
String htmlData = request.getParameter("imgs") != null ? request.getParameter("imgs") : "";
%>
<!doctype html>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>ImageDialog Examples</title>
		<link rel="stylesheet" href="themes/default/default.css" />
		<script src="js/kindeditor.js"></script>
		<script src="js/jquery.js"></script>
		<script src="js/zh_CN.js"></script>
		<script>
			KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : true,
					uploadJson : 'upload.action',
					fileManagerJson : 'jsp/file_manager_json.jsp'
				});
				K('#image3').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							showRemote : false,
							imageUrl : K('#url3').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#url3').val(url);
								editor.hideDialog();
								$("#imgs").attr("src",url);
							}
						});
					});
				});
				$("#img1").attr("src","images/background.png");
			});
		</script>
	</head>
	<body>
		<img name="imgs" id="imgs" alt="" src="images/add.png">
		<p><input type="text" id="url3" value="" /> <input type="button" id="image3" value="本地上传" />本地</p>
	</body>
</html>
